package cn.com.czpb.client.module.newspager.adapter;

import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import cn.com.czpb.client.R;
import cn.com.czpb.client.model.newspager.NewspagerBean;

import java.util.List;

/**
 * Created by 猪猪侠 on 2017/7/20.
 */

public class NewspagerRecycleAdapter extends BaseQuickAdapter<NewspagerBean,BaseViewHolder> {

    private List<NewspagerBean> list;
    public NewspagerRecycleAdapter(List<NewspagerBean> list){
        super(R.layout.item_newspager,list);
    }
    @Override
    protected void convert(BaseViewHolder helper, NewspagerBean item) {
        Glide.with(mContext).load(item.getImgurl()).crossFade().placeholder(R.drawable.default_bg).into((ImageView) helper.getView(R.id.img_newspager_id));
        helper.setText(R.id.tv_title_id,item.getName())
        .addOnClickListener(R.id.ll_newspager_id);

    }












}
